package com.freight.file.service;

import com.freight.core.base.FreightBaseService;
import com.freight.core.common.vo.Result;
import com.freight.core.common.vo.SearchVo;
import com.freight.file.entity.File;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 文件管理接口
 * @describe
 */
public interface FileService extends FreightBaseService<File, Long> {

    /**
     * 多条件获取列表
     * @param file
     * @param searchVo
     * @param pageable
     * @return
     */
    Page<File> findByCondition(File file, SearchVo searchVo, Pageable pageable);

    /**
     *
     * @param file
     * @param base64
     * @param fileType
     * @return
     */
    Result<Object> saveFile(MultipartFile file, String base64,String fileType);

    /**
     *
     * @param file
     * @param fileType
     * @return
     */
    File saveFileByUserId(MultipartFile file,String fileType);

}